package com.wxh.config;

import feign.Logger;
import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wxh
 */
@Configuration
public class ServiceFeignConfig {

    /**
     * 使用用户名和密码来实现请求
     *
     * @return
     */
    @Bean
    public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
        return new BasicAuthRequestInterceptor("user", "123");
    }


    @Bean
    Logger.Level feignLoggerLevel() {
        // 设置日志
        return Logger.Level.FULL;
    }
}
